// 相关资产跟设备设施还没有 空着吧 日后找宇航要 绑定后删除这句话
<template>
  <div class="padding-20">
    <el-table :border="false" stripe :data="tableData" class="new-table-style">
      <el-table-column align="left" label="相关事项" prop="chargeItemName" width="200"> </el-table-column>
      <el-table-column align="left" label="合同金额合计">
        <template slot-scope="scope">
          <span>{{ scope.row.contractTotalAmount | moneyFilterNoUnit }}</span>
        </template>
      </el-table-column>
      <el-table-column align="left" label="已申请付款合计">
        <template slot-scope="scope">
          <span>{{ scope.row.applyAmount | moneyFilterNoUnit }}</span>
        </template>
      </el-table-column>
      <!-- <el-table-column align="left" label="相关资产" prop="workNum"> </el-table-column>
      <el-table-column align="left" label="相关设备设施" prop="workNum"> </el-table-column> -->
      <el-table-column align="left" label="合同金额">
        <template slot-scope="scope">
          <span>{{ scope.row.contractChargeAmount | moneyFilterNoUnit }}</span>
        </template>
      </el-table-column>
      <el-table-column align="left" label="已申请付款">
        <template slot-scope="scope">
          <span>{{ scope.row.paymentAmount | moneyFilterNoUnit }}</span>
        </template>
      </el-table-column>
      <el-table-column align="left" label="说明" prop="fundsDesc"> </el-table-column>
    </el-table>

    <Pagination v-if="total" @change="pageChange" :total="total" paginationLayout="total, prev, pager, next" />
  </div>
</template>

<script>
  import { apiPaymentRecordList } from '../../../api/contract';
  export default {
    name: 'expend',
    data() {
      return {
        tableData: [],
        total: 0,
        currentPage: 1,
        pageSize: 10,
      };
    },
    mounted() {
      this.getDataSource();
    },
    methods: {
      async getDataSource(more) {
        let res = await apiPaymentRecordList({
          currentPage: more ? this.currentPage : 1,
          pageSize: this.pageSize,
          contractCode: this.$route.query.contractCode,
        });
        this.tableData = res.rows || [];
        this.total = res.total || 0;
      },

      //分页
      pageChange(page) {
        this.currentPage = page.currentPage;
        this.getDataSource('more');
      },
    },
  };
</script>

<style lang="scss" scoped>
  .no-border-inner {
    ::v-deep .el-input__inner {
      border: none;
      background: #f2f2f2;
      font-size: 16px;
      color: #999;
    }
  }
</style>
